use tauri::{Manager, Window};
use window_shadows::set_shadow;
#[tauri::command]
pub async fn create_window(
    app_handle: tauri::AppHandle,
    window: tauri::Window,
    label: String,
    title: String,
    url: String,
    width: f64,
    height: f64,
) {
    let _ = tauri::WindowBuilder::new(&app_handle, &label, tauri::WindowUrl::App(url.into()))
        .title(&title)
        .decorations(false)
        .inner_size(width, height)
        .build()
        .map(|_| "Window created successfully".to_string())
        .map_err(|e| e.to_string());
    let window: Window = window.get_window(&label).expect("");
    set_shadow(&window, true).expect("Unsupported platform!");
}
